Question: Let $f(x)=\begin{cases} \dfrac{x^2-4}{x+2}&\text{for }x\neq -2 \\\\ k&\text{for }x=-2 \end{cases}$ $f$ is continuous for all real numbers. What is the value of $k$ ? Choose 1 answer: Choose 1 answer: (Choice A) A $2$ (Choice B) B $-2$ (Choice C) C $-4$ (Choice D) D $0$
Explanation: $\dfrac{x^2-4}{x+2}$ is continuous for all real numbers other than $x=-2$ which means $f$ is continuous for all real numbers other than $x=-2$. In order for $f$ to also be continuous at $x=-2$, the following equality must hold: $\lim_{x\to -2}f(x)=f(-2)$ Since $f(-2)=k$, we will obtain the above equality by letting $k=\lim_{x\to -2}f(x)$. So let's find $\lim_{x\to -2}f(x)$, come on! $\begin{aligned} &\phantom{=}\lim_{x\to -2}f(x) \\\\ &=\lim_{x\to -2}\dfrac{x^2-4}{x+2} \gray{\text{This is the rule for }x\neq-2} \\\\ &=\lim_{x\to -2}\dfrac{\cancel{(x+2)}(x-2)}{\cancel{x+2}} \gray{\text{Factor}} \\\\ &=\lim_{x\to -2}(x-2) \gray{\text{Cancel common factors}} \\\\ &\text{(This is allowed because }x\neq -2) \\\\ &=(-2)-2 \gray{\text{Direct substitution}} \\\\ &=-4 \end{aligned}$ We obtained that if we set $k=-4$, then $\lim_{x\to -2}f(x)=f(-2)$, which makes $f$ continuous at $x=-2$. Since we already saw that $f$ is continuous for any other real number, we can determine that it's continuous for all real numbers. In conclusion, $k=-4$.